
<script id="view-article-template" type="text/x-handlebars-template">
	<form class="form-horizontal form-editor form-editor-article">
		<input type="hidden" name="id" value="{{id}}"/>
		<input type="hidden" id="articlesType" value="{{articleType}}"/>
		<input type="hidden" id="authorsId" value="{{teacherId}}"/>
		<input type="hidden" id="shopsId" value="{{shopId}}"/>
		<input type="hidden" id="picture" value="{{pictures}}"/>
		<div class="row">	
			<div class="col-sm-8">
				<div class="form-group">
					<label class="col-sm-2 control-label required" for="title">标题</label>
					<div class="col-sm-10">
						<input name="title" id="title" type="text" class="form-control" required="required" value="{{title}}" >
					</div>
				</div>   
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label required" for="articleType">类型</label>
					<div class="col-sm-8">
						<select name="articleType" id="articleType" class="chosen-select "> 
								<option value="育儿宝典">育儿宝典</option>
								<option value="热门活动">热门活动</option>
						</select>
					</div>
				</div>
			</div>
		</div>
					
		<div class="row">		
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="createTime">发布时间</label>
					<div class="col-sm-8">
						<div class="input-group date date-selector">
							<input name="createTime" id="createTime" type="text" class="form-control" value="{{createTime}}"> 
							<span class="input-group-addon">
								<span class="fa fa-calendar"></span>
							</span>
						</div>
					</div>
				</div>
			</div>
			<div class="col-sm-4">
				<div class="form-group">
					<label class="col-sm-4 control-label" for="shopId">发布机构</label>
					<div class="col-sm-8">
						<select name="shopId" id="shopId" class="chosen-select" onchange="getAuthors()">
						</select>
	        </div> 
	     	</div>
     	</div>  
     				
			<div class="col-sm-4"> 
				<div class="form-group">
					<label class="col-sm-4 control-label">发布人</label>
					<div class="col-sm-8">
						<select id="authorId" name="authorId" class="chosen-select">
	          </select>
	        </div>
	     	</div>
     	</div> 
     				
		</div>	
			<div class="row">
         <div class="col-sm-8">
					 <div class="widget-header bordered-top ">
						 <span class="widget-caption"> <font color="#f85d2c">文章摘要</font> </span>
					 </div>
					 <div class="widget-body">
						 <textarea id="summary" name="summary" class="form-control" required="required" rows="8" maxlength="50" placeholder="可输入50字">{{summary}}</textarea>
					 </div>
				</div>
				<div class="col-sm-4">
					<div class="widget-header bordered-top ">
						<span class="widget-caption"> <font >首页图片 (APP首页展示需要)</font> </span>
					</div>						
					<div class="widget-body" style="width: 100%; height: 197px;">
						<input name="pcitures" type="hidden" value="{{pictures}}">
						<a href="javascript:void(0);"  onclick="handlerModal(this, 'content/system/content/article/dialog/pictures.html', 'createPictures', 'destroyPictures');">
							{{#if pictures}}
								<img src="{{pictures}}" width="100%" height="100%" id="_img">
							{{else}} 
								<img src="/miwawa/resources/photos/web/empty.png" width="100%" height="100%" id="_img">
							{{/if}}
						</a>
					</div>	
				</div>
					
		</div>
		
<p></p>
								
		<div class="row">
			<div class="col-sm-8">
				<div class="widget">
					<div class="widget-header bordered-top bordered-pink">
						<span class="widget-caption"> 文章内容</span>
						<div class="widget-buttons buttons-bordered">
						</div>
					</div>
					<div class="widget-body">
						<textarea id="content" name="content" class="form-control">{{content}}</textarea>
					</div>
				</div>
			</div>
			<div class="col-sm-4" >
				<div class="widget">
					<div class="widget-header bordered-top bordered-pink">
						<span class="widget-caption"> 手机预览效果</span>
					</div>
					<div class="widget-body"  >
						<div id="preview" style="width:100%; height:568px; position:relative; background: url('/miwawa/resources/photos/web/mobile.png') center center;background-size:100% 100%;" >
							<div id="contentPreview" style="position:absolute;top:76px;left:20px;bottom:76px;right:20px;word-wrap:break-word;overflow-y:auto; ">									
										
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		
		<div class="widget-footer editor-footer-sm">
			<button type="button" class="btn btn-danger btn-sm" data-toggle="tooltip" data-placement="top" title="取消" onclick="handlerCancel(this);" data-refresh-table="#table-article">
				<i class="glyphicon glyphicon-remove"></i>
			</button>
			<button type="button" class="btn btn-primary btn-sm" data-toggle="tooltip" data-placement="top" title="保存" onclick="handlerSubmit(this, '#editor-form-article', '.form-editor-article', 'getSrc');">
				<i class="glyphicon glyphicon-ok"></i>
			</button>
		</div>
	</form>
</script>
	
